package com.nbstar.film.spider.domain;

import com.nbstar.film.spider.pojo.FilmInfo;
import com.nbstar.film.spider.pojo.RawFromExcel;
import lombok.Data;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Data
public class SpiderDomain {
    private RawFromExcel raw;
    private Map<String, FilmInfo> spiderResult = new HashMap<>();

    public RawFromExcel getRaw() {
        return raw;
    }

    public void setRaw(RawFromExcel raw) {
        this.raw = raw;
    }

    public Map<String, FilmInfo> getSpiderResult() {
        return spiderResult;
    }

    public void setSpiderResult(ConcurrentHashMap<String, FilmInfo> spiderResult) {
        this.spiderResult = spiderResult;
    }

    public void put(String key, FilmInfo info) {
        spiderResult.put(key, info);
    }

    public FilmInfo get(String key) {
        return spiderResult.get(key);
    }
}
